package model;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @author rpitts@gmu.edu
 */
public class ZoneRelay extends Zone {
	
	private int port = 0;
	
	//private Map<String,RemoteZone> remoteZone = new HashMap<String,RemoteZone>();
	private List<RemoteZone> remoteZones = new ArrayList<RemoteZone>();
		
	
	public ZoneRelay(String name, int dimension, int window, int port) {
		super(name, dimension, window);
		this.port = port;
	}

	public int getPort() {
		return port;
	}

	public void addRemoteZone(String name, String iP, int port) {
		remoteZones.add(new RemoteZone(name, iP, port));
	}
	
	public boolean hasRemoteZones() {
		return this.remoteZones.size() > 0;
	}
	
	public Iterator<RemoteZone> remoteZones() {
		return this.remoteZones.iterator();
	}

}
